﻿//********************************************************************************//
//创建日期：<创建日期，2016-12-22>
//创建作者：<郭登杰，guodengjie@shanghai3h.com>
//功能说明：来函文件列表打印
//********************************************************************************//
using System;
using Entity;
using BLL;
using BLL.Access;
using System.Data;
using Web.Class;
using DevExpress.Web;

namespace Web.Pages.YongShui
{
    public partial class LaiHanDYWJLB : BasePage
    {
        #region 属性

        /// <summary>
        /// 保存结果集
        /// </summary>
        private DataTable dtSource
        {
            get
            {
                return ViewState["dtSource"] as DataTable;
            }
            set
            {
                ViewState["dtSource"] = value;
            }
        }

        private string UploadDirectory = "/UPLOAD/YJ/";  //图片上传文件夹路径

        #endregion

        #region 变量

        YS_YJ_FUJIANProcess _YS_YJ_FUJIANBLL = new YS_YJ_FUJIANProcess();

        /// <summary>
        /// 应急预案附件对象
        /// </summary>
        YS_YJ_FUJIAN _YS_YJ_FUJIAN = new YS_YJ_FUJIAN();

        /// <summary>
        /// 操作日志BLL
        /// </summary>
        SYS_LOGBLL _SYS_LOGBLL = new SYS_LOGBLL();

        #endregion

        #region 事件
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                LoadData(true);
            }            
            LoadData(false);
        }

        /// <summary>
        /// 响应前台回调
        /// </summary>
        protected void ASPxCallback1_Callback(object source, DevExpress.Web.CallbackEventArgs e)
        {
            CallbackResult cr = new CallbackResult(e.Parameter);         
        }

        /// <summary>
        /// 前台验证后实际执行后台操作
        /// </summary>
        protected void btnActPerformExport_Click(object sender, EventArgs e)
        {
            
        }

        protected void gvList_CustomCallback(object sender, ASPxGridViewCustomCallbackEventArgs e)
        {
            LoadData(true);
        }

        #endregion

        #region 方法

        private void LoadData(bool reget)
        {
            if (reget)
            {
                YS_LH_LAIHANXX lhxx = new YS_LH_LAIHANXXProcess().SelectYS_LH_LAIHANXX(int.Parse(this.Request.QueryString["lhid"]));
                this.hdCollection.Set("lhbh", lhxx.S_LAIHANBH);                
                this.dtSource = new SpHelper().P_YSBB_LAIHANGLPJHQ((int)lhxx.I_LAIHANLX,lhxx.S_LAIHANBH).Tables[0];                
            }
            this.gvList.DataSource = this.dtSource;
            this.gvList.DataBind();
        }

        #endregion       
    }

}